When a spherical panoramic image (a spherical image for short) is processed, generally, the spherical image is first projected to a two-dimensional planar panoramic image (a two-dimensional image for short) in a polyhedral format, and then encoding and decoding operations are performed on the two-dimensional image in the polyhedral format.
When motion-compensated prediction is performed for the two-dimensional image in the polyhedral format, generally, a location of a reference pixel of a current pixel is first determined, and then a pixel value of the current pixel is predicted based on a pixel value of the reference pixel. In a motion-compensated prediction process in some approaches, regardless of whether the reference pixel is located on a face on which the current pixel is located, the pixel value of the current pixel is predicted based on the pixel value at a location of the reference pixel. When the reference pixel is not on the face on which the current pixel is located, because all faces in the two-dimensional image in the polyhedral format are not on a same projection plane, a region in which the faces meet each other is deformed, causing a poor effect of predicting the pixel value of the current pixel based on the pixel value at the location of the reference pixel.